/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src;

import java.util.ArrayList;

/**
 *
 * @author Mauricio
 */
public class Memento {
    
    private ArrayList<JFigura> figuras = new ArrayList<>();

    Memento(ArrayList<JFigura> figures) {
        this.figuras = (ArrayList<JFigura>) figures.clone();
    }
    
    public ArrayList<JFigura> obtenerFiguras(){
        return this.figuras;        
    }
   
    public int getSize() {
        return this.figuras.size();
    }

    void print() {
        if (this.figuras.size() > 0)
            System.out.println("mi ultimo elto es: " + this.figuras.get(this.figuras.size()-1).getRamo().toString());
    }
    
}
